{extend name="common/base" /}
<!--title-->
{block name="titlekeyword"}
<title>{$content}</title>

{/block}
<!--代码主要内容-->
{block name="main"}
<h6>内容</h6>

<h6>代码</h6>
<pre>
	&lt;script language="javascript"&gt;
	window.onload = function () {  //先加载页面内容 再加载js
		var arr2 = [{ "name": "小明", "age": "20" }, { "name": "大明", "age": "40" }, { "name": "老明", "age": "60" }];

		$.each(arr2, function (i, n) {
			alert(i + " " + n.name + " " + n.age);
		})
	}
&lt;/script&gt;

	 </pre> {/block}
<!--底部js 在这里是js的实际代码区-->
{block name="footjs"}
<script language="javascript">
	window.onload = function () {  //先加载页面内容 再加载js
		var arr2 = [{ "name": "小明", "age": "20" }, { "name": "大明", "age": "40" }, { "name": "老明", "age": "60" }];

		$.each(arr2, function (i, n) {
			alert(i + " " + n.name + " " + n.age);
		})
	}
</script> {/block}